home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_shs_unwindow.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  73 lines

  1.  
  2. # Jones 3D Cog Script
  3. #
  4. # shs_UNwindow.cog "Scheiß das Fenster." for the UN seed prep area 
  5. #  [JWC]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.     
  12.     message     startup
  13.     message     damaged
  14.     
  15.     material    brokenout
  16.     material    brokenin
  17.  
  18.     surface     insidewindow    mask=0x408        
  19.     surface        outsidewindow    mask=0x408    
  20.     
  21.     sound        shatter=shs_glassbreak.wav    local
  22.  
  23.     template    shards=iceshrapa        local
  24.  
  25.     thing        shardpos    mask=0x8  # aimable object to allow Indy to target
  26.     thing       chain       mask=0x8  # any close shot should break window
  27.     thing       player        local
  28.     
  29.     int            broken=0    local
  30.  
  31. end
  32.  
  33. # ========================================================================================
  34.  
  35. code
  36.  
  37. startup:
  38.     
  39.     player = GetLocalPlayerThing();
  40.     
  41.     return;
  42.     
  43. # ========================================================================================
  44.  
  45. damaged:
  46.         
  47.         if(broken == 0)
  48.         {
  49.             Print("damaged");
  50.             broken=1;
  51.             PlaySoundLocal(shatter, 1.0, 0, 0, 0);
  52.             
  53.             # Make stuff
  54.             CreateThing(shards, shardpos);
  55.             
  56.             # Swap Texture
  57.             SetSurfaceMat(insidewindow, brokenin);
  58.             SetSurfaceMat(outsidewindow,brokenout);
  59.             
  60.             # Make adjoin move
  61.             SetAdjoinFlags(insidewindow, 0x02);
  62.             SetAdjoinflags(outsidewindow, 0x02);
  63.  
  64.             DestroyThing(shardpos); 
  65.         }
  66.     return;
  67.  
  68. # ========================================================================================
  69.  
  70. end
  71.  
  72.